package cn.smartorigin.soas.frame;

import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

public class ImageLabel extends JLabel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	ImageIcon img;
	
	public ImageLabel(){
	}
	
	public ImageLabel(ImageIcon icon){
		this.img = icon;
	}

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		g.drawImage(img.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);
	}

}
